# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=mandown
pkgver=0.1.2
pkgrel=0
pkgdesc="Create man pages from markdown markup"
url="https://gitlab.com/kornelski/mandown"
license="Apache-2.0"
arch="all !s390x !riscv64" # blocked by rust/cargo
makedepends="cargo"
source="https://gitlab.com/kornelski/mandown/-/archive/$pkgver/mandown-$pkgver.tar.gz
	minimize-size.patch
	cargo-lock.patch
	"
options="!check" # no test suite

prepare() {
	default_prepare

	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

package() {
	cargo install --frozen --offline --path . --root="$pkgdir"/usr
	rm "$pkgdir"/usr/.crates*
}

sha512sums="
9f22e96b3a944183903056853f701dd89f6bf14bce87580cf9714f70a5bc443f4f8a3481b92b8ee75db7d9bf07ad0ccca23727a1b0e6b1c9d8cf92cf6c479793  mandown-0.1.2.tar.gz
bcec8a586951e3b16a660d269dbd1f9f6dfd24f1ad3c1fa689d966310c204971c307dc8b5fb439a89cad9004ccc178722e092c40f74af34a0833a0c2e214dfe8  minimize-size.patch
001c641d97a001d7ea2dae7d2e48f97aa1d4cd1e6924328bafa9117d7241d3058b2d4b2661eaa67108cc15d5b3e472cb19bb1d017b84b0add5f59be6ec9bf700  cargo-lock.patch
"
